#!/sbin/openrc-run

command="/usr/sbin/kamailio"
command_args="$KAMAILIO_OPTS -DD -u ${KAMAILIO_USER:-kamailio} -g ${KAMAILIO_GROUP:-kamailio}"
command_background="true"
pidfile="/run/kamailio.pid"

depend() {
	need net
	after firewall mariadb postgresql
}

start_pre() {
	checkpath -d -o kamailio:kamailio /var/run/kamailio
	kamailio -c
}
